package com.example.common.adapter

import com.example.common.entity.BannerEntity
import com.example.image.ImageLoadStrategy
import com.example.image.ImageLoadUtil
import com.youth.banner.adapter.BannerImageAdapter
import com.youth.banner.holder.BannerImageHolder

class ImageBannerAdapter(data:MutableList<BannerEntity>):BannerImageAdapter<BannerEntity>(data) {
    override fun onBindView(holder: BannerImageHolder, data: BannerEntity, position: Int, size: Int) =
        ImageLoadUtil.with(holder.imageView.context)
            .loadResource(data.resource).into(holder.imageView)

}